<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Document</title>
	<style type="text/css">
		.box{
			width: 500px;
			height: 300px;
			background: violet;
			margin: 0 auto;
			line-height: 300px;
			text-align: center;
		}
	</style>
</head>
<body>
	<div class="box">
		此页面已奔溃将在<i style="color: blue;" id="miao"></i>秒后离开!
	</div>
	<script type="text/javascript">
		var oMiao = document.getElementById("miao");
		var i = 5;
		oMiao.innerText = i;
		setInterval(function(){
			i--;
			if(i<=1){
				location.href="http://www.baidu.com";
			}
			oMiao.innerText=i;
		},1000);
	</script>
</body>
</html>